﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Model;

public partial class Virkir : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
        
    }
    protected void Button1_Click(object sender, EventArgs e)
    {

        string data = Request["q17"];
        var db = new DataClassesDataContext();
        int src;
        var qry = (from x in db.Companies
                   where x.CompanyCode.Equals(Convert.ToInt32(data))
                   select x).ToList();
        rptCompanies.DataSource = qry;
        rptCompanies.DataBind();
    }
    protected void Button3_Click(object sender, EventArgs e)
    {
        
        var db = new DataClassesDataContext();
        
        var qry = (from x in db.Companies
                   where x.CompanyName.Contains(txtInput.Text)
                   select x).ToList();
        rptCompanies.DataSource = qry;
        rptCompanies.DataBind();
    }
    protected void txtInput_TextChanged(object sender, EventArgs e)
    {
        }
}